(function() {
	var page = pf.newPage('overlay');
	var $el = null;

	var _action = {};

	/**
	 * 初始化时调用
	 */
	page.onCreate = function() {
		$el = page.$el;

		$el.on('click', '.testDrive.btn', function() {
			pf.overlay('testDrive', {
				car_img: './image/contact/vehicles/' + _action["big"] + '/' + _action["small_car"] + '.png',
				car_name: __(_action["small_car"])
			});
		});
	};

	/**
	 * 页面显示时自动调用
	 */
	page.onShow = function(action) {
		// $el.show();
		$el.find(".show").css('background-image', 'url(./image/contact/vehicles/' + action["big"] + '/' + action["small_car"] + '.png)');
		$el.find(".title.content").html(__(action["small_car"]));

		// show test drive page
		_action = action;
	};

	/**
	 * 页面隐藏时调用
	 */
	page.onHide = function() {
		// $el.hide();
	};

})();